package cn.org.donald.string;

/**
 * @author Donald
 * @since 2023-11-15 09:48:59
 **/
public class Unicode {
    public static void main(String[] args) {
        String text = "病毒库";
        for (char c : text.toCharArray()) {
            String hexString = Integer.toHexString(c);
            if (hexString.length() <= 2) {
                hexString = "\\u00" + hexString;
            } else {
                hexString = "\\u" + hexString;
            }
            System.out.println(c + "：" + hexString);
        }
    }
}
